<?php
$ary = array(
    'user' => array('name' => '会员管理','parent'=>'会员管理', 'child' => array(
        array('name' => '会员', 'child' => array(
//            array('name' => '后台首页', 'act' => 'welcome', 'op' => 'Admin'),
            array('name' => '会员列表', 'act' => 'index', 'op' => 'Users','child'=>[
                ['name'=>'修改','act'=>'detail'],
                ['name'=>'添加会员','act'=>'reg1'],
                ['name'=>'导入会员','act'=>'import'],
                ['name'=>'导出会员','act'=>'export_order'],
                ['name'=>'服务中心|锁定','act'=>'changeTableVal'],
            ]),
            array('name' => '域名列表', 'act' => 'index', 'op' => 'AuthDomain','child'=>[
                ['name'=>'修改','act'=>'edit'],
            ]),

            array('name' => '直推网络图', 'act' => 'tjnet', 'op' => 'Users'),
            array('name' => '推荐网体修改', 'act' => 'movenet', 'op' => 'Users'),
            array('name' => '网体修改记录', 'act' => 'index', 'op' => 'Netlog','child'=>[
                ['name'=>'导出网体修改记录','act'=>'export_order'],
            ]),
            array('name' => '会员级别', 'act' => 'index', 'op' => 'UserLevel','child'=>[
                ['name'=>'编辑会员级别','act'=>'edit'],
            ]),
            array('name' => '升级记录', 'act' => 'index', 'op' => 'LevelLog'),

        )),

        array('name' => '财务', 'child' => array(
//            array('name' => '余额明细', 'act' => 'money_log', 'op' => 'caiwu','child'=>[
//                ['name'=>'奖金明细导出','act'=>'export_order'],
//            ]),
            array('name' => '在线支付', 'act' => 'index', 'op' => 'Payment','child'=>[
            ]),
            array('name' => '奖金明细', 'act' => 'index', 'op' => 'BonusDetail','child'=>[
            ]),
            array('name' => '充值记录', 'act' => 'index', 'op' => 'RechargeLog','child'=>[
            ]),
            array('name' => '汇款记录', 'act' => 'huikuan', 'op' => 'RechargeLog','child'=>[
            ]),

            array('name' => '提现列表', 'act' => 'index', 'op' => 'Withdrawals','child'=>[
                ['name'=>'提现设置','act'=>'txset','op'=>'Caiwu'],
                ['name'=>'同意提现','act'=>'agrees'],
                ['name'=>'拒绝提现','act'=>'refunds'],
                ['name'=>'提现导出','act'=>'excel'],
            ]),
            array('name' => '货款提现列表', 'act' => 'index', 'op' => 'WithdrawalsSupply','child'=>[
                ['name'=>'同意提现','act'=>'agrees'],
                ['name'=>'拒绝提现','act'=>'refunds'],
                ['name'=>'提现导出','act'=>'excel'],
            ]),
            array('name' => '转账设置', 'act' => 'index', 'op' => 'TransferSet','child'=>[
                ['name'=>'转账设置添加修改','act'=>'edit'],
                ['name'=>'转账设置删除','act'=>'del'],
            ]),
            array('name' => '转账记录', 'act' => 'index', 'op' => 'Transfer','child'=>[
                ['name'=>'转账审核','act'=>'edit'],
            ]),
        )),

    )),

    'shop' => array('name' => '商城管理','parent'=>'商城管理', 'child' => array(
        array('name' => '供应商', 'child' => array(
            array('name' => '商家分类', 'act' => 'index', 'op' => 'SupplyCategory','child'=>[
                ['name'=>'添加|修改商家分类','act'=>'*'],
            ]),
            array('name' => '供应商列表', 'act' => 'index', 'op' => 'Suppliers','child'=>[
                ['name'=>'供应商添加修改','act'=>'edit'],
                ['name'=>'供应商删除','act'=>'del'],
            ]),
        )),
        array('name' => '商品', 'child' => array(
            array('name' => '商品列表', 'act' => 'index', 'op' => 'Goods','child'=>[
                ['name'=>'商品列表添加编辑','act'=>'add'],
                ['name'=>'商品列表删除|批量删除','act'=>'del'],
                ['name'=>'审核商品','act'=>'audit'],
            ]),
            array('name' => '秒杀商品', 'act' => 'index', 'op' => 'SeckillProduct','child'=>[
                ['name'=>'商品列表添加编辑','act'=>'edit'],
                ['name'=>'商品列表删除|批量删除','act'=>'del'],
                ['name'=>'审核商品','act'=>'audit'],
            ]),
            array('name' => '库存日志', 'act' => 'index', 'op' => 'StockLog','child'=>[
                ['name'=>'库存日志导出','act'=>'export_order'],
            ]),
            array('name' => '商品分类', 'act' => 'index', 'op' => 'GoodsCategory','child'=>[
                ['name'=>'商品分类添加编辑','act'=>'edit'],
                ['name'=>'商品分类删除','act'=>'del'],
            ]),

            array('name' => '评论列表', 'act' => 'index', 'op' => 'Comment','child'=>[
                ['name'=>'评论列表删除','act'=>'del'],
            ]),
        )),
        array('name' => '订单', 'child' => array(
            array('name' => '全部订单', 'act' => 'index', 'op' => 'Order','child'=>[
                ['name'=>'订单详情','act'=>'detail'],
                ['name'=>'订单操作','act'=>'*'],
            ]),
            array('name' => '待支付订单', 'act' => 'index', 'op' => 'Order', 'par' => 'status/0'),
            array('name' => '待发货订单', 'act' => 'index', 'op' => 'Order', 'par' => 'status/1/is_th/1'),
            array('name' => '待收货订单', 'act' => 'index', 'op' => 'Order', 'par' => 'status/2'),
            array('name' => '待评价订单', 'act' => 'index', 'op' => 'Order', 'par' => 'status/3'),
            array('name' => '已完成订单', 'act' => 'index', 'op' => 'Order', 'par' => 'status/4'),
            array('name' => '售后订单', 'act' => 'index', 'op' => 'OrderRefund'),
            array('name' => '售后原因', 'act' => 'index', 'op' => 'RefundReason'),
        )),

        array('name' => '配送', 'child' => array(
            array('name' => '配送方式', 'act' => 'index', 'op' => 'Freight','child'=>[
                ['name'=>'运费模板添加编辑','act'=>'addEdit'],
                ['name'=>'运费模板删除','act'=>'del'],
            ]),
            array('name' => '快递公司', 'act' => 'index', 'op' => 'Shipping','child'=>[
                ['name'=>'快递公司添加编辑','act'=>'addEdit'],
                ['name'=>'快递公司删除','act'=>'del'],
            ]),
        )),
        array('name' => '配送员', 'child' => array(
            array('name' => '配送员列表', 'act' => 'index', 'op' => 'PeisongUser','child'=>[
                ['name'=>'修改/添加','act'=>'edit'],
            ]),
            array('name' => '配送员订单', 'act' => 'index', 'op' => 'PeisongOrder','child'=>[
                ['name'=>'修改/添加','act'=>'edit'],
            ]),
        )),
        array('name' => '营销', 'child' => array(
            array('name' => '优惠券', 'act' => 'index', 'op' => 'Coupon'),
            array('name' => '促销活动', 'act' => 'index', 'op' => 'Cuxiao'),
        )),
    )),

    'system' => array('name' => '系统设置', 'child' => array(

        array('name' => '设置', 'child' => array(
            array('name' => '系统设置', 'act' => 'index', 'op' => 'System','child'=>[
                ['name'=>'系统设置保存','act'=>'handle'],
            ]),

            array('name' => '清除缓存', 'act' => 'cleanCache', 'op' => 'System'),
            array('name' => '地区列表', 'act' => 'region', 'op' => 'Tools'),
            array('name' => '系统日志', 'act' => 'index', 'op' => 'SysLog'),
            array('name' => '系统升级', 'act' => 'index', 'op' => 'Upgrade'),
        )),
        array('name' => '微信', 'child' => array(
            array('name' => '公众号配置', 'act' => 'index', 'op' => 'Wechat'),
            array('name' => 'DIY菜单', 'act' => 'index', 'op' => 'WxMenu'),
            array('name' => '自动回复', 'act' => 'auto_reply', 'op' => 'Wechat'),
            array('name' => '自动回复素材', 'act' => 'materials', 'op' => 'Wechat'),
            array('name' => '模板消息', 'act' => 'template_msg', 'op' => 'Wechat'),
        )),
        array('name' => '微信小程序', 'child' => array(
            array('name' => '小程序配置', 'act' => 'setting', 'op' => 'WxApp'),
        )),
        array('name' => '手机APP', 'child' => array(
            array('name' => 'APP配置', 'act' => 'index', 'op' => 'Appset'),
        )),
        array('name' => '支付', 'child' => array(
            array('name' => '支付列表', 'act' => 'index', 'op' => 'PayWay','child'=>[
                ['name'=>'系统设置保存','act'=>'handle'],
            ]),
        )),
        array('name' => '文件存储', 'child' => array(
            array('name' => '存储方式', 'act' => 'index', 'op' => 'OssSet','child'=>[
                ['name'=>'系统设置保存','act'=>'handle'],
            ]),
        )),
        array('name' => '短信', 'child' => array(
            array('name' => '短信设置', 'act' => 'index', 'op' => 'Sms','child'=>[
            ]),
//            array('name' => '发送列表', 'act' => 'index', 'op' => 'SendSms','child'=>[
//                ['name'=>'短信删除','act'=>'del'],
//            ]),
            array('name' => '短信模板', 'act' => 'index', 'op' => 'SmsTemplate','child'=>[
                ['name'=>'短信模板添加编辑','act'=>'addEdit'],
            ]),
        )),

        array('name' => '文章', 'child' => array(
            array('name' => '文章列表', 'act' => 'index', 'op' => 'Article','child'=>[
                ['name'=>'文章列表添加编辑','act'=>'article'],
                ['name'=>'文章列表删除','act'=>'aticleHandle'],
            ]),
            array('name' => '文章分类', 'act' => 'categoryList', 'op' => 'Article','child'=>[
                ['name'=>'文章分类添加编辑','act'=>'category'],
                ['name'=>'文章分类删除','act'=>'categoryHandle'],
            ]),
        )),
//        array('name' => '站内信', 'child' => array(
//            array('name' => '列表', 'act' => 'index', 'op' => 'Msg','child'=>[
//                ['name'=>'回复','act'=>'huifu'],
//                ['name'=>'删除','act'=>'delete'],
//            ]),
////            array('name' => '文章分类', 'act' => 'categoryList', 'op' => 'Article','child'=>[
////                ['name'=>'文章分类添加编辑','act'=>'category'],
////                ['name'=>'文章分类删除','act'=>'categoryHandle'],
////            ]),
//        )),
        array('name' => '权限', 'child' => array(
            array('name' => '修改密码', 'act' => 'admin_info', 'op' => 'Admin'),
            array('name' => '管理员列表', 'act' => 'index', 'op' => 'Admin','child'=>[
                ['name'=>'管理员列表添加编辑','act'=>'admin_info'],
                ['name'=>'管理员列表删除','act'=>'adminHandle'],
            ]),
            array('name' => '角色管理', 'act' => 'role', 'op' => 'Admin','child'=>[
                ['name'=>'角色管理添加编辑','act'=>'role_info'],
                ['name'=>'角色管理删除','act'=>'roleHandle'],
            ]),

        )),
        array('name' => '设计页面', 'child' => array(
            array('name' => '设计页面', 'act' => 'index', 'op' => 'DesignPage'),
//            array('name' => '编辑页面', 'act' => 'edit', 'op' => 'DesignPage'),
            array('name' => '底部导航', 'act' => 'index', 'op' => 'DesignMenu'),
            array('name' => '商品海报', 'act' => 'index', 'op' => 'SharePoster'),
//            array('name' => '登录页面', 'act' => 'index', 'op' => 'DesignLogin'),
        )),
        array('name' => '系统升级', 'act' => 'index', 'op' => 'Upgrade','child' => array()),
    )),
);
//财务明细
$wallet = logic('Wallet')->getName();
foreach ($wallet as $key => $val) {
    if($key=='s_money'){
        $ary['user']['child'][1]['child'][] = array('name' => $val . '明细', 'act' => 's_money_log', 'op' => 'Caiwu', 'par' => 'money_type/' . $key,'child'=>[
            ['name'=>'财务明细导出','act'=>'export_order'],
        ]);
    }else{
        $ary['user']['child'][1]['child'][] = array('name' => $val . '明细', 'act' => 'money_log', 'op' => 'Caiwu', 'par' => 'money_type/' . $key,'child'=>[
            ['name'=>'财务明细导出','act'=>'export_order'],
        ]);
    }

}
//开发者模式
//if (session('?develop')) {
    $ary['resource'] = array(
        'name' => '来吧',
        'child' => array(
            array('name' => '功能',
                'child' => array(
//                    array('name' => '系统开关', 'act' => 'open', 'op' => 'Weihu'),
                    array('name' => '会员钱包', 'act' => 'wallet', 'op' => 'Weihu'),
//                    array('name' => '会员资料','act'=>'userdata','op'=>'Weihu'),
                    array('name' => '商品类型', 'act' => 'index', 'op' => 'GoodsLeixing','child'=>[
                        ['name'=>'添加编辑','act'=>'addEdit'],
                        ['name'=>'删除','act'=>'del'],
                    ]),
                    array('name' => '商品价格', 'act' => 'goodsprice', 'op' => 'Weihu'),
                    array('name' => '支付规则', 'act' => 'index', 'op' => 'Payrule'),
                    array('name' => '初始化数据', 'act' => 'chushiDb66del', 'op' => 'Weihu'),
                )),
        ));
//}



return $ary;
